Crate tonic_types

source ·
Expand description

A collection of useful protobuf types that can be used with tonic.

This crate also introduces the StatusExt trait and implements it in tonic::Status, allowing the implementation of the gRPC Richer Error Model with tonic in a convenient way.

Re-exports

pub use pb::Status;

Modules

Useful protobuf types

Structs

Used to encode/decode the BadRequest standard error message described in error_details.proto. Describes violations in a client request. Focuses on the syntactic aspects of the request.
Groups the standard error messages structs. Provides associated functions and methods to setup and edit each error message independently. Used when extracting error details from tonic::Status, and when creating a tonic::Status with error details.
Used at the field_violations field of the BadRequest struct. Describes a single bad request field.

Enums

Wraps the structs corresponding to the standard error messages, allowing the implementation and handling of vectors containing any of them.

Traits

Used to implement associated functions and methods on tonic::Status, that allow the addition and extraction of standard error details.